package com.atguigu.dao.impl;

import com.atguigu.dao.UserDao;
import com.atguigu.pojo.User;

public class UserDaoImpl extends BaseDaoImpl implements UserDao {

    @Override
    public User findUserByName(String username) {
        String sql = "select * from sys_user where username = ?";
        User user = getBean(User.class, sql, username);
        return user;
    }

    @Override
    public int updatePassword(String encrypt,String username) {
        String sql = "UPDATE sys_user SET password=? WHERE username = ?";
        return update(sql,encrypt,username);
    }
}
